#include <stdio.h>
#include <opencv2/opencv.hpp>
#include <fstream>
#include <iostream>
#include <armadillo>
#include <iomanip>
#include <vector>

using namespace std;
using namespace arma;

#include "optflow_feat_def.hpp"
#include "optflow_feat_impl.hpp"



uword ro = 120;
uword co = 160;


///Run this once, then load
/*
uvec
rand_split()
{
 
  arma_rng::set_seed_random();
  uvec v1 = linspace<uvec>(1,25,25);
  uvec v2 = shuffle(v1);

  //v2.t().print("v2:");
  v2.save("rand_selection_run1.dat",raw_ascii);

  
  return v2;
}
*/




//NICTA
//const std::string single_path = "/home/johanna/codes/multi-actions/kth_single_action/"; 
//const std::string multi_path = "/home/johanna/codes/multi-actions/kth_multi_allVideos/stitched_dataset_run1/"; 

//home
const std::string single_path = "/home/johanna/codes/multi-action/kth_single_action/"; 
const std::string multi_path = "/home/johanna/codes/multi-action/kth_multi_allVideos/stitched_dataset_run1/";


const std::string  actionNames = "actionNames.txt";



int
main(int argc, char** argv)
{
  
  uvec rand_videos; 
  rand_videos.load("./run1/rand_selection_run1.dat");
  
  //rand_videos.t().print("rand_pos");
  //getchar();
  
  
  uvec peo_train = rand_videos.subvec (0,15);
  uvec peo_test  = rand_videos.subvec (16,24);
  int N_cent = 16;




  opt_feat kth_optflow(single_path, multi_path, actionNames, co, ro, peo_train, peo_test);
  //kth_optflow.features_per_action_training();
  //kth_optflow.create_gmm_action(N_cent);
  
  

  

  
  
  ///Testing Multi-Action
  
  //Calculating features for multi-videos:
  kth_optflow.feature_multi_action( );
  //kth_optflow.gmm_multi_action( N_cent );

    
  
  
}



